# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=freeciv
pkgver=3.0.7
pkgrel=1
pkgdesc="A multiuser clone of the famous Microprose game of Civilization"
arch=('loong64' 'x86_64')
url="http://www.freeciv.org/"
license=('GPL')
depends=('gtk3' 'sdl_mixer' 'lua53' 'sqlite' 'curl')
makedepends=('python')
backup=('etc/freeciv/database.lua')
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.xz)
sha512sums=('b78fc6880348a5b8a53977930b8f2516414aad5c65ebce2aef12000931ff15b2e6786c1d6883da9e9e09d039a18eb91463b17b6a9467908ab3c052ef7fe94bfb')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --enable-shared --enable-sys-lua \
    --enable-client=gtk3 --enable-fcmp=gtk3 --enable-fcdb=sqlite3 --enable-aimodules
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
